#ifndef _LINUX__INIT_TASK_H
#define _LINUX__INIT_TASK_H

#include <linux/thread_info.h>

extern struct thread_info init_thread_info;
extern struct mm_struct init_mm;
extern struct fs_struct init_fs;

#define INIT_SIGNALS(sig) {						\
	.wait_chldexit	= __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit),\
}

#define INIT_TASK(tsk)	\
{									\
	.state		= 0,						\
	.stack		= &init_thread_info,				\
	.flags		= PF_KTHREAD,					\
	.prio		= MAX_PRIO-20,					\
	.static_prio	= MAX_PRIO-20,					\
	.normal_prio	= MAX_PRIO-20,					\
	.policy		= SCHED_NORMAL,					\
	.mm		= NULL,						\
	.active_mm	= &init_mm,					\
	.rt		= {						\
		.time_slice	= HZ, 					\
	},								\
	.tasks		= LIST_HEAD_INIT(tsk.tasks),			\
	.real_parent	= &tsk,						\
	.parent		= &tsk,						\
	.children	= LIST_HEAD_INIT(tsk.children),			\
	.sibling	= LIST_HEAD_INIT(tsk.sibling),			\
	.comm		= "swapper",					\
	.fs		= &init_fs,					\
	.signal		= &init_signals,				\
}

#define __init_task_data __attribute__((__section__(".data.init_task")))

#endif
